feat(chronicle): Add Terraform support for Chronicle Parser#17774
feat(chronicle): Add Terraform support for Chronicle Parser#17774govisingh-dotcom wants to merge 2 commits into
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @melinath, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 7161a46: Diff reportYour PR generated the following diffs in downstream repositories:
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_chronicle_parser" "primary" {
changelogs {
entries {
change_message = # value needed
create_time = # value needed
deleted = # value needed
parser_version = # value needed
}
}
low_code {
field_extractors {
append_repeated_fields = # value needed
extractors {
value = # value needed
}
preprocess_config {
grok_regex = # value needed
target = # value needed
}
}
}
version_info {
auto_upgrade_disabled = # value needed
}
}
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. @govisingh-dotcom, @melinath, @ankitgoyal0301 VCR tests complete for 7161a46! |
There was a problem hiding this comment.
Please ensure that all fields are tested - see missing test report
you may also want to use samples instead of examples for tests because it allows handling update tests as well as basic tests: https://googlecloudplatform.github.io/magic-modules/reference/sample/ Migration guide: https://googlecloudplatform.github.io/magic-modules/reference/update-test-changes/
7161a46 to
b714269
Compare
I have successfully migrated the test suite to the modern samples framework, expanded the configurations to cover all writeable fields reported in the missing test report, and removed the custom handwritten test file. All acceptance tests compile and pass cleanly locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit b714269: Diff reportYour PR generated the following diffs in downstream repositories:
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_chronicle_parser" "primary" {
changelogs {
entries {
change_message = # value needed
create_time = # value needed
deleted = # value needed
parser_version = # value needed
}
}
}
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. @govisingh-dotcom, @melinath, @ankitgoyal0301 VCR tests complete for b714269! |
This PR adds the google_chronicle_parser resource in GA. It includes basic and full configurations auto-generated under the modern samples framework, and a custom flattener to handle the write-only validated_on_empty_logs field. TAG=agy CONV=7ff89b1b-2de9-433d-a2c7-25158b871127
b714269 to
95169e2
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 95169e2: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @govisingh-dotcom, @melinath, @ankitgoyal0301 VCR tests complete for 95169e2! |
| - projects/{{project}}/locations/{{location}}/instances/{{instance}}/logTypes/{{logtype}}/parsers/{{parser}} | ||
| autogen_status: UGFyc2Vy | ||
| autogen_async: false | ||
| samples: |
There was a problem hiding this comment.
Can you please add update tests?
There was a problem hiding this comment.
Actually most of the writeable fields for google_chronicle_parser (such as cbn, low_code, and validated_on_empty_logs) are immutable (ForceNew: true), meaning any changes to them force the resource to be recreated. Because of this, we split the configurations into separate basic and full single-step tests to verify these fields.
The only mutable field that supports in-place updates is version_info.auto_upgrade_disabled. I will add a multi-step update test that toggles auto_upgrade_disabled."
| @@ -0,0 +1,14 @@ | |||
| func flatten{{$.GetPrefix}}{{$.TitlelizeProperty}}(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} { | |||
There was a problem hiding this comment.
Can you please add a comment on the purpose of this file for better readabillity?
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 6257764: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @govisingh-dotcom, @melinath, @ankitgoyal0301 VCR tests complete for 6257764! |
This PR adds the
google_chronicle_parserresource in GA.It includes:
ignore_read: trueto handle the API's write-onlyvalidated_on_empty_logs(internal nameskip_validation_on_no_logs) field, cleanly avoiding perpetual diffs and import mismatches.